<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style type="text/css">
        table {
            border-collapse: collapse;
            margin: 0px auto 0px auto;
        }

        table th, td {
            border: 1px solid black;
            text-align: center;
        }
    </style>
</head>
<body>

    <table>
        <tr>
            <th>ID</th>
            <th>NAME</th>
            <th>SALARY</th>
        </tr>
        <tbody th:if="${#lists.isEmpty(empList)}">
            <tr>
                <td colspan="3">抱歉！没有查询到数据！</td>
            </tr>
        </tbody>
        <tbody th:if="${not #lists.isEmpty(empList)}">
            <tr th:each="emp : ${empList}">
                <td th:text="${emp.empId}">这里显示员工ID</td>
                <td th:text="${emp.empName}">这里显示员工NAME</td>
                <td th:text="${emp.empSalary}">这里显示员工SALARY</td>
            </tr>
        </tbody>
    </table>

    <a th:href="@{/}">回首页</a>

</body>
</html>